﻿namespace Api.Controllers
{
    /// <summary>
    /// 磁头
    /// </summary>
    public class MagnetHeadController : EditingBaseController<MagnetHeadModel, MagnetHeadFilterModel, IMagnetHeadLogic>
    {
        public MagnetHeadController(ICurrentUser currentUser, IMagnetHeadLogic logic)
            : base(currentUser, logic)
        {
        }

        #region 状态监测列表
        [HttpPost]
        public async Task<PageModel<MagnetHeadModel>> GetStatusMonitorPage([FromBody] MagnetHeadFilterModel filterModel, int pageIndex = 1, int pageSize = Gx._PAGE_SIZE, string orderBy = null)
        {
            try
            {
                return await _logic.GetStatusMonitorPage(filterModel, pageIndex, pageSize, orderBy);
            }
            catch (Exception ex)
            {
                throw new CustomException($"Error in GetStatusMonitorPage: {ex.Message}");
            }
        }
        #endregion
    }
}
